package net.oschina.app.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ImageView;

import net.oschina.app.R;

/**
 * Created by Administrator on 2017/4/7.
 */

public class NoteActivity extends AppCompatActivity{
    private Toolbar mToolbar;
    private ImageView mNewNote;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_note);
        mToolbar = (Toolbar) findViewById(R.id.tb_note);
        setSupportActionBar(mToolbar);
        mToolbar.setNavigationIcon(R.drawable.actionbar_back_icon_normal);
        mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        mNewNote = (ImageView) findViewById(R.id.new_note);
        mNewNote.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getApplicationContext(),NewNoteActivity.class);
                startActivity(intent);
            }
        });
    }
}
